package com.ruoyi.customerSample.service.impl;


import com.ruoyi.customerSample.domain.BackSampleDetail;
import com.ruoyi.customerSample.mapper.BackSampleDetailMapper;
import com.ruoyi.customerSample.service.IBackSampleDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 退样明细单据Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-15
 */
@Service
public class BackSampleDetailServiceImpl implements IBackSampleDetailService
{
    @Autowired(required = false)
    private BackSampleDetailMapper backSampleDetailMapper;

    /**
     * 查询退样明细单据
     * 
     * @param id 退样明细单据ID
     * @return 退样明细单据
     */
    @Override
    public BackSampleDetail selectBackSampleDetailById(String id)
    {
        return backSampleDetailMapper.selectBackSampleDetailById(id);
    }

    /**
     * 根据退样id查询明细
     * @param backId
     * @return
     */
    @Override
    public List<BackSampleDetail> selectBackSampleDetailByBackId(String backId) {
        return backSampleDetailMapper.selectBackSampleDetailByBackId(backId);
    }


    /**
     * 查询退样明细单据列表
     * 
     * @param backSampleDetail 退样明细单据
     * @return 退样明细单据
     */
    @Override
    public List<BackSampleDetail> selectBackSampleDetailList(BackSampleDetail backSampleDetail)
    {
        return backSampleDetailMapper.selectBackSampleDetailList(backSampleDetail);
    }

    /**
     * 新增退样明细单据
     * 
     * @param backSampleDetail 退样明细单据
     * @return 结果
     */
    @Override
    public int insertBackSampleDetail(BackSampleDetail backSampleDetail)
    {
        return backSampleDetailMapper.insertBackSampleDetail(backSampleDetail);
    }

    /**
     * 批量新增明细单据
     * @param backSampleBillList
     * @return
     */
    @Override
    public int batchBackSampleDetailBill(List<BackSampleDetail> backSampleBillList) {
        return backSampleDetailMapper.batchBackSampleDetailBill(backSampleBillList);
    }

    /**
     * 修改退样明细单据
     * 
     * @param backSampleDetail 退样明细单据
     * @return 结果
     */
    @Override
    public int updateBackSampleDetail(BackSampleDetail backSampleDetail)
    {
        return backSampleDetailMapper.updateBackSampleDetail(backSampleDetail);
    }


    /**
     * 根据还样id删除明细
     * @param backId
     * @return
     */
    @Override
    public int deleteBackSampleDetailByBackId(String backId) {
        return backSampleDetailMapper.deleteBackSampleDetailByBackId(backId);
    }

    /**
     * 批量删除退样明细单据
     * 
     * @param ids 需要删除的退样明细单据ID
     * @return 结果
     */
    @Override
    public int deleteBackSampleDetailByIds(String[] ids)
    {
        return backSampleDetailMapper.deleteBackSampleDetailByIds(ids);
    }

    /**
     * 删除退样明细单据信息
     * 
     * @param id 退样明细单据ID
     * @return 结果
     */
    @Override
    public int deleteBackSampleDetailById(String id)
    {
        return backSampleDetailMapper.deleteBackSampleDetailById(id);
    }
}
